<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>LRY-视频列表</title>
<link rel="icon" th:href="@{/static/favicon.ico}" type="image/ico">
<meta name="keywords" content="LRY 聚合系统">
<meta name="description" content="LRY 聚合系统">
<meta name="author" content="pingc">
<link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
<link th:href="@{/static/css/materialdesignicons.min.css}" rel="stylesheet">
  <link th:href="@{/static/css/animate.css}" rel="stylesheet">
<link th:href="@{/static/css/style.min.css}" rel="stylesheet">
</head>
<style type="text/css">
  table {
    table-layout: fixed;
    word-break: break-all;
  }
  td {white-space:nowrap;overflow:hidden;word-break:keep-all;text-overflow:ellipsis}
</style>
<body>
<div class="container-fluid p-t-15">
  
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-toolbar clearfix">
          <form class="pull-right search-bar" method="get" th:action="@{/admin/video_list/1/10}" role="form">
            <div class="input-group">
              <div class="input-group-btn">
                <input type="hidden" name="option" id="optionz" th:value="${option} == null ? title :${option}">
                <button class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown" type="button" aria-haspopup="true" aria-expanded="false">
                  <span  id ='title' th:text="${option}== title ? 标题 : (${option}== author ? 作者 : (${option}== videoType ? 分类 : (${option}== videoVariableId ? 来源:标题 ) ))"></span><span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                  <li> <a tabindex="1" href="javascript:void(0)" onclick="ec('标题','title')"  class="ula" data-field="title">标题</a> </li>
                  <li> <a tabindex="1" href="javascript:void(0)" onclick="ec('作者','author')" class="ula" data-field="cat_name">作者</a> </li>
                  <li> <a tabindex="2" href="javascript:void(0)" onclick="ec('分类','videoType')" class="ula" data-field="cat_name">分类</a> </li>
                  <li> <a tabindex="2" href="javascript:void(0)" onclick="ec('来源','videoVariableId')" class="ula" data-field="cat_name">来源</a> </li>
                </ul>
              </div>
              <input type="text" class="form-control" value="" name="key" placeholder="请输入名称" th:value="${key}">
            </div>
          </form>
          <div class="toolbar-btn-action">
            <a class="btn btn-primary m-r-5 videoAdd" href="javascript:void(0)"><i class="mdi mdi-plus "></i> 采集</a>
            <label class="lyear-switch switch-success">
              自动采集
              <input type="checkbox" onclick="updateGather()" aria-checked="" th:if="${istatus} eq 1">
              <input type="checkbox" onclick="updateGather()" checked="" th:if="${istatus} eq 0">
              <span></span>
            </label>
            <a class="btn btn-danger pst" href="javascript:void(0)" ><i class="mdi mdi-delete"></i> 删除</a>
            <a class="btn btn-info btn-w-md psttt" href="javascript:void(0)" ><i class="mdi mdi-check"></i> 开启更新</a>
            <a class="btn btn-warning pstt" href="javascript:void(0)" ><i class="mdi mdi-window-close "></i> 关闭更新</a>
            <a class="btn btn-cyan" href="/video/deleteKeysCache" target = "_blank"><i class="mdi mdi-window-close "></i> 清除缓存</a>

          </div>
        </div>
        <div class="card-body">
          
          <div class="table-responsive">
            <table class="tree-table table table-bordered table-hover" >
              <thead>
                <tr>
                  <th width="3%">
                    <label class="lyear-checkbox checkbox-primary">
                      <input type="checkbox" id="check-all"><span></span>
                    </label>
                  </th>
                  <th width="10%">标题</th>
                  <th width="8%">导演</th>
                  <th width="5%">分类</th>
                  <th width="25%">简介</th>
                  <th width="20%">封面</th>
                  <th width="10%">更新时间</th>
                  <th width="10%">创建时间</th>
                  <th width="5%">来源</th>
                  <th width="7%">操作</th>
                </tr>
              </thead>
              <tbody th:each="v : ${videos}">
                <tr>
                  <td width="50px" class="bs-checkbox " data-field="check">
                    <label class="lyear-checkbox checkbox-primary ">
                      <input type="checkbox" name="video" th:value="${v.videoId}"><span></span>
                    </label>
                  </td>
                  <td th:text="${v.title}" ></td>
                  <td th:text="${v.author}"></td>
                  <td th:text="${v.videoType}"></td>
                  <td th:text="${v.descs}"></td>
                  <td th:text="${v.cover}"></td>
                  <td th:text="${v.updateTime}"></td>
                  <td th:text="${#dates.format(v.creationTime,  'yyyy-MM-dd HH:mm:ss')}"></td>
                  <td th:text="${v.videoVariableId}"></td>
                  <td>
                    <div class="btn-group">
                      <a class="btn btn-xs btn-default" th:href="@{/video/search/{option}/{key} (option=videoId,key=${v.videoId})}" target="_blank" title="查看" data-toggle="tooltip"><i class="mdi mdi-eye"></i></a>
                      <a class="btn btn-xs btn-default "  title="删除" data-toggle="tooltip"  href="javascript:void(0)"  th:onclick="showDeleteModal([[${v.videoId}]]);" ><i class="mdi mdi-delete"></i></a>
                      <a class="btn btn-xs btn-default "  title="关闭更新" data-toggle="tooltip"  href="javascript:void(0)"  th:onclick="showDeleteModall([[${v.videoId}]]);" th:if="${videoUp[v.videoId]} ne null"><i class="mdi mdi-window-close"></i></a>
                      <a class="btn btn-xs btn-default "  title="开启更新" data-toggle="tooltip"  href="javascript:void(0)"  th:onclick="showDeleteModalll([[${v.videoId}]]);" th:if="${videoUp[v.videoId]} eq null"><i class="mdi mdi-check"></i></a>

                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <ul class="pagination">
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=1,size=10,option=${option},key=${key})}" >首页</a></li>
            <li><a href="#" th:if="${from} le 1">«</a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${from} - 1,size=10,option=${option},key=${key})}" th:if="${from} gt 1">«</a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key}(from=${from} - 2,size=10,option=${option},key=${key})}" th:if="${from}-2 gt 0" th:text="${from} -2"></a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${from} - 1,size=10,option=${option},key=${key})}" th:if="${from}-1 gt 0" th:text="${from} -1"></a></li>
            <li class="active"><span th:text="${from}"></span></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${from} + 1,size=10,option=${option},key=${key})}" th:if="${from}+1 le ${pages}" th:text="${from} + 1"></a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${from} + 2,size=10,option=${option},key=${key})}" th:if="${from}+2 le ${pages}" th:text="${from} + 2" ></a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${from} + 1,size=10,option=${option},key=${key})}" th:if="${from} lt ${pages}">»</a></li>
            <li><a href="#" th:if="${from} ge ${pages}">»</a></li>
            <li><a th:href="@{/admin/video_list/{from}/{size}?option={option}&key={key} (from=${pages},size=10,option=${option},key=${key})}" >尾页</a></li>

          </ul>
        </div>
      </div>
    </div>
  </div>
</div>
<!--删除数据-->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="delcfmOverhaul">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" id="myLargeModalLabel">提示</h4>
      </div>
      <div class="modal-body">
        <input type="hidden" id="deleteHaulId" />
        <p>你确定要删除数据吗？</p>
      </div>
      <div class="modal-footer">
        <button type="button" id="gb" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="deleteHaulBtn">确定</button>
      </div>
    </div>
  </div>
</div>
<!--关闭更新-->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="delcfmOverhaull">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" id="myLargeModalLabell">提示</h4>
      </div>
      <div class="modal-body">
        <input type="hidden" id="deleteHaulupId" />
        <p>你确定要关闭更新吗？</p>
      </div>
      <div class="modal-footer">
        <button type="button" id="gbbb" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="deleteHaulBtnn">确定</button>
      </div>
    </div>
  </div>
</div>

<!--采集加-->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="addcfmOverhaul">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" >采集</h4>
      </div>
      <div class="modal-body">
        <input class="form-control" type="text" id="example-text-input" name="example-text-input" placeholder="请输入需要采集的关键词..">
      </div>
      <div class="modal-footer">
        <button type="button" id="gbb" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="haulBtn">确定</button>
      </div>
    </div>
  </div>
</div>
<!--开启更新-->
<div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="delcfmOverhaulll">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
        <h4 class="modal-title" id="myLargeModalLabelll">提示</h4>
      </div>
      <div class="modal-body">
        <input type="hidden" id="deleteHaulupIdd" />
        <p>你确定要开启更新吗？</p>
      </div>
      <div class="modal-footer">
        <button type="button" id="gbbbb" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="button" class="btn btn-primary" id="deleteHaulBtnnn">确定</button>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript" th:src="@{/static/js/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/bootstrap.min.js}"></script>
<!--消息提示-->
<script th:src="@{/static/js/bootstrap-notify.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/lightyear.js}"></script>
<script type="text/javascript" th:src="@{/static/js/main.min.js}"></script>
<script type="text/javascript" th:src="@{/static/js/video.list.js}"></script>
<script type="text/javascript">




</script>
</body>
</html>